<template>
  <div class="index">
      <div class="wrap">
        <!-- <div class="crumbs flex"><div class="p">首页</div><div class="p" v-if="parent.meta">>{{ parent.meta.title }}</div><div class="p">>{{title}}</div></div> -->
        <div class="crumbs flex">
            <router-link to="/" class="p">首页</router-link>
            <router-link class="p" :to="parent.path" v-if="parent.meta">>服务商超</router-link>
            <div class="p">>{{title}}</div>
          </div>
        <div class="nav flex-jus">
            <li class="on" @click="togNav('/service')">服务商超</li>
            <li @click="togNav('/service/product')">人才服务</li>
            <li @click="togNav('/service/enterprise')">企业大学</li>
            <li @click="togNav('/service/activity')">活动</li>
          </div>
        <!-- <div class="top flex">
          <div class="top-img" :style="{background: 'url('+require('../../assets/service/product-img1.png')+') center center no-repeat',backgroundSize:'cover'}"></div>
          <div class="top-right">
            <div class="top-right-title">定制化服务</div>
            <div class="p1">由脉网公司提供</div>
            <div class="p2">脉网公司简介：由新华社厦门5月3日电（记者付敏 李慧颖）从台湾回到厦门他们‘看懂’。”范姜锋说。这一系列“懒人包”在网络推出后，获得台湾网友的极大关注，不少台青台企联系咨询。“这些‘懒人包’向台湾网友传递了大陆真实的情况，告诉那些在大陆创业的台湾青年，如何有计划地克服复工复产面临的困难。”范姜锋说，“我们期待这些账号成为一个让台湾青年了解大陆的咨询平台。”</div>
            <div class="p3">官方网址：http://www.xmmc.edu.cn/zsxx/  https://www.xmmc.edu.cn</div>
            <div class="p3">官方电话：0592-6275566</div>
            <div class="p3">电子邮箱：201000010152@xmmc.edu.cn</div>
          </div>
        </div> -->
        <div class="centent">
          <div class="centent-title">{{datas.title}}</div>
          <div class="centent-div" v-html="datas.content"></div>
          <!-- <div class="frien flex-jus">
            <div class="friena flex">上一个产品： <p>天虹服务中心</p></div>
            <div class="friena flex">下一个产品： <p>坪洲服务中心</p></div>
          </div> -->
        </div>
      </div>
  </div>
</template>
<script>
import {getInfomationDetail} from '@/api/service/service'
export default {
  name: "index",
  data() {
    return {
        parent:{},                      //获取父路由信息
        title:"",
        img:require("../../assets/image/profile.jpg"),
        id:"",                            //文章id
        datas:{},
        route:{}
    }
  },
  created(){
    this.id=this.getQueryString("id");
    this.getInfomationDetailapi()
  },
  mounted(){
      this.route = this.$route;
      this.parent = this.$route.matched[0];
      this.title = this.$route.meta.title;
  },
  methods:{
    togNav(e){
      this.$router.push(e)
    },
    getQueryString (name) { 
      let reg = `(^|&)${name}=([^&]*)(&|$)`
      let r = window.location.search.substr(1).match(reg); 
      if (r != null) return unescape(r[2]); return null; 
    },
    getInfomationDetailapi(){
      getInfomationDetail({id:this.id}).then(res=>{
        this.datas = res.datas
      })
    }
  }
}
</script>
<style scoped>
.index{
  background: #fff;
}
.crumbs{
    padding: 10px 0 0 0;
}
.crumbs .p{
    font-size: 14px;
}
.service-title{
  padding: 36px 0 0 0;
  text-align: center;
  color: #5E9F8E;
}
.service-title h2{
  font-size: 36px;
  line-height: 52px;
}
.service-title p{
  font-size: 14px;
  line-height: 24px;
  text-transform:uppercase;
}
.nav {
  padding: 0;
}
.nav li{
  font-size: 16px;
  color: #343434;
  line-height: 20px;
  padding: 0 15px;
  transition:all .5s;
}
.nav li.on{
  color: #CE3A5C;
}
.nav li:hover{
  color: #CE3A5C;
}
.top {
  padding-top: 90px;
}
.top .top-img{
  width: 438px;
  height: 410px;
}
.top .top-right{
  padding-top: 12px;
  padding-right: 20px;
  padding-left: 110px;
  width: 600px;
  box-sizing:unset
}
.top .top-right .top-right-title{
  font-size: 28px;
  line-height: 30px;
  padding-bottom: 2px;
  color: #121212;
  position: relative;
}
.top .top-right .top-right-title::after{
  content: " ";
  position: absolute;
  top: 0;
  left: -20px;
  width: 7px;
  height: 32px;
  border-radius: 4px;
  background: #3EACC4;
}
.top .top-right .p1{
  font-size: 18px;
  padding: 20px 0 10px 0;
  color: #343434;
}
.top .top-right .p2{
  padding-bottom: 20px;
  color: #343434;
  font-size: 14px;
  line-height: 30px;
}
.top .top-right .p3{
  line-height: 28px;
  font-size: 16px;
  position: relative;
  color: #3EACC4;
  padding-left: 30px;
}
.centent{
  padding: 50px 0;
  line-height: 180%;
}
.centent .centent-title{
  padding: 2px 0 30px 0;
  font-size: 28px;
  color: #343434;
  text-align: center;
}
.centent .frien{
  padding-top: 50px;

}
.centent .frien .friena{
  padding: 0 26px;
  color: #3EABC4;
  font-size: 12px;
  line-height: 120%;
}

</style>